package com.stx.openeyes.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.stx.openeyes.R;
import com.stx.openeyes.model.UserVideo;
import com.stx.openeyes.model.Video;

import java.util.List;

public class VideoRemarkAdapter extends BaseAdapter {
    private static final String TAG = "VideoRemarkAdapter";
    private LayoutInflater inflater;
    private List<UserVideo> itemList;

    public VideoRemarkAdapter(Context context, List<UserVideo> itemList) {
        this.itemList = itemList;
        this.inflater = LayoutInflater.from(context);
    }


    @Override
    public int getItemViewType(int position) {
        return 1;
    }

    @Override
    public int getCount() {
        return itemList.size();
    }

    @Override
    public Object getItem(int position) {
        return itemList.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }


    @Override
    public View getView(int position, View convertView, ViewGroup parent) {


        //设置布局
        View view = inflater.inflate(R.layout.remark_list_view_item,parent,false);
        UserVideo itemListEntity = (UserVideo)getItem(position);
        //获取控件
        TextView remark = view.findViewById(R.id.re);
        //set data
        remark.setText(itemListEntity.getBeizhu());


        return view;

    }




}

